Skip to content

ci: clone ColdCard repo only once#820

Merged
achow101 merged 1 commit intobitcoin-core:masterfrom
Sjors:2026/01/coldcard-ci
Jan 30, 2026
Merged

ci: clone ColdCard repo only once#820
achow101 merged 1 commit intobitcoin-core:masterfrom
Sjors:2026/01/coldcard-ci

Conversation

@Sjors
Copy link
Copy Markdown
Member

@Sjors Sjors commented Jan 26, 2026

Based on #818.

@Sjors Sjors mentioned this pull request Jan 27, 2026
# Remove .git directories to shrink the archive
find test/work/firmware -name ".git" -type d -exec rm -rf {} + 2>/dev/null || true
# Archive the full firmware directory
tar -czf "${{ inputs.archive }}.tar.gz" test/work/firmware
Copy link
Copy Markdown
Member

@achow101 achow101 Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be updating paths in .github/sim-build-map.json?

Looking at that, it seems like all of the other devices are including the full repos, not sure why coldcard was different in that regard.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it was trying to keep the archive small.

I replaced the special handling for ColdCard with just updating this map.

# This avoids re-cloning the large repo with many submodules in every test job
if [ "${{ inputs.name }}" = "coldcard" ]; then
# Remove .git directories to shrink the archive
find test/work/firmware -name ".git" -type d -exec rm -rf {} + 2>/dev/null || true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this step should be done for all repos?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Sjors Sjors force-pushed the 2026/01/coldcard-ci branch from a42c71c to bd6bb91 Compare January 30, 2026 08:41
@Sjors
Copy link
Copy Markdown
Member Author

Sjors commented Jan 30, 2026

Rebased, applied .git stripping to all devices and updated the the sim build map. That's a lot simpler.

@Sjors Sjors marked this pull request as ready for review January 30, 2026 08:42
],
"coldcard": [
{ "name": "coldcard", "archive": "coldcard-mpy", "paths": "test/work/firmware/external/micropython/ports/unix/coldcard-mpy test/work/firmware/unix/coldcard-mpy test/work/firmware/unix/l-mpy test/work/firmware/unix/l-port" }
{ "name": "coldcard", "archive": "coldcard-firmware", "paths": "test/work/firmware" }
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could expand this JSON to include paths that can be pruned before archiving, if storage costs are an issue. But that's tedious to maintain.

Avoids spurious CI failures by not re-cloning the large repo with
many submodules in every test job.

Additionally, stip .git folder(s) for all devices to shrink
archives.
@Sjors Sjors force-pushed the 2026/01/coldcard-ci branch from bd6bb91 to bc7f751 Compare January 30, 2026 10:21
@Sjors
Copy link
Copy Markdown
Member Author

Sjors commented Jan 30, 2026

Had to make an exception for Speculos, because setuptools_scm uses .git for version detection.

@achow101
Copy link
Copy Markdown
Member

ACK bc7f751

@achow101 achow101 merged commit 23cab4f into bitcoin-core:master Jan 30, 2026
233 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants